
#include <string.h>
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>


#define tc_log(_fmt_, ...)          printf("[TC][%s:%d][%s] "_fmt_"\n", __FILE__, __LINE__, __func__, ##__VA_ARGS__)
#define tc_log_err(_fmt_, ...)      printf("[TC][ERR][%s:%d][%s] "_fmt_"\n", __FILE__, __LINE__, __func__, ##__VA_ARGS__)


static void hexdump(unsigned char *buf, int len, const char *str, ...)
{
	int i;

	va_list args;
 	va_start(args, str);
	vprintf(str, args);
	va_end(args);

	for (i = 0; i < len; ++i) {
		if (i % 16 == 0) {
			if (i >= 16)
				printf("\n");
			printf("\n%p:", buf + i);
		}
		printf(" %02x", buf[i]);
	}
	printf("\n");
}

int atoi_self(char c)
{
	return c - '0';
}

void dec_inc(unsigned char *buf, int dec, int a) 
{
	// printf("a = %d\n", a);
	buf[dec] += a;
	// printf("buf[%d] %d\n", dec, buf[dec]);
	if (buf[dec] >= 10) {
		dec_inc(buf, dec + 1, buf[dec] / 10);
		buf[dec] %= 10;
	}
}

int main(int argc, char const *argv[])
{
#if 1
	unsigned char a[2][100], b[200];
	int part = 0, num[2], i, j, ret, tmp, dec, n, m, k;

	num[0] = num[1] = 0;
	do {
		ret = scanf("%c", &a[part][num[part]]);

		// printf("a[%d][%d] %c ret %d\n", part, num[part], a[part][num[part]], ret);
		if (a[part][num[part]] == 0x0a || a[part][num[part]] == 0x0d)
			break;

		if (a[part][num[part]] == ' ') {
			if (part++ >= 2)
				break;
		} else {
			num[part]++;
		}
	} while (ret);

	// printf("num[0] = %d num[1] = %d\n", num[0], num[1]);
	// for (i = 0; i < 2; ++i) {
	// 	for (j = 0; j < num[i]; ++j)
	// 		printf("%c", a[i][j]);

	// 	printf("\n");
	// }

	memset(b, 0x0, sizeof(b));
	
	for (j = num[1]; j > 0; j--) {
		dec = num[1] - j;
		for (i = num[0]; i > 0; i--) {
			m = atoi_self(a[0][i-1]);
			n = atoi_self(a[1][j-1]);
			// printf("m %d n %d\n", m, n);
			tmp = m * n;
			// printf("%d = a[%d][%d](%d) * a[%d][%d](%d)\n", tmp, 0, i-1,  m, 1, j-1, n);

			dec_inc(b, dec, tmp);

			// if (tmp >= 10) {
			// 	b[dec+1] += tmp / 10;
			// 	b[dec] += tmp % 10;
			// } else  {
			// 	b[dec] += tmp;
			// }

			// for (k = dec; k >= 0; k--)
			// 	printf("b[%d] %d\n", k, b[k]);

			dec++;
		}
	}

	for (k = sizeof(b); k > 0; k--) {
		if (b[k] != 0) {
			dec = k;
			break;
		}
	}

	// printf("dec %d\n", dec);

	for (k = dec; k >= 0; k--)
		printf("%d", b[k]);

	printf("\n");

#else


	unsigned int a = '0', b = 0x02;

	printf("%d\n", atoi(a));
	// printf("%ld, %ld\n", ((a >> 8) * b) << 8, (a & 0xff) * b);
#endif
	return 0;
}


